package com.xuan.webwork.service;

import com.xuan.webwork.entitys.Teacher;

import java.util.List;
import java.util.Optional;

public interface TeacherService {
    
    // 获取所有教师
    List<Teacher> getAllTeachers();
    
    // 根据ID获取教师
    Optional<Teacher> getTeacherById(Long id);
    
    // 根据教师编号获取教师
    Optional<Teacher> getTeacherByTeacherId(String teacherId);
    
    // 保存教师（新增或更新）
    Teacher saveTeacher(Teacher teacher);
    
    // 根据ID删除教师
    void deleteTeacherById(Long id);
    
    // 根据教师编号删除教师
    void deleteTeacherByTeacherId(String teacherId);
    
    // 根据姓名模糊查找教师
    List<Teacher> findTeachersByName(String name);
    
    // 根据部门查找教师
    List<Teacher> findTeachersByDepartment(String department);
    
    // 检查教师编号是否存在
    boolean existsByTeacherId(String teacherId);
    
    // 根据多个条件查找教师
    List<Teacher> findTeachersByConditions(String name, String department, String title);
}
